Fix #6025: SpecialImport.php -> wrong message when no file was selected
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 May 2006 07:37:47 +0000 (07:37 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 20 May 2006 07:37:47 +0000 (07:37 +0000)
Patch by Jimmy Collins <jimmy.collins@web.de>

RELEASE-NOTES
includes/SpecialImport.php

index 8eb5b0a..8f775fe 100644 (file)
@@ -300,7 +300,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6012) Update to Indonesian localisation (id)
 * (bug 6017) Update list of bookstores in German localisation files
 * (bug 5187) Allow programmatically bypassing username validation, for scripts
-
+* (bug 6025) SpecialImport: wrong message when no file selected
 
 == Compatibility ==
 
index 91abcea..57a0ec7 100644 (file)
@@ -615,7 +615,7 @@ class ImportStreamSource {
        function newFromUpload( $fieldname = "xmlimport" ) {
                $upload =& $_FILES[$fieldname];
 
-               if( !isset( $upload ) ) {
+               if( !isset( $upload ) || !$upload['name'] ) {
                        return new WikiErrorMsg( 'importnofile' );
                }
                if( !empty( $upload['error'] ) ) {